package com.xyy.saas.payment.cores.enums;

/**
 * @Description 
 * @Param
 * @return 
 * @Author User
 * @Date 2021/6/28 下午2:19
 **/
public enum TerminalTypeEnum {


    PC("PC"),
    APP("APP"),
    H5("H5");

    private String type;

    TerminalTypeEnum(String type){
        this.type = type;
    }

    public String getChannel() {
        return type;
    }

    public static boolean contains(String code) {
        if (code == null || code.trim().length() == 0) {
            return false;
        }
        for (TerminalTypeEnum channelEnum : TerminalTypeEnum.values()) {
            if (channelEnum.type.equals(code.trim())) {
                return true;
            }
        }
        return false;
    }
}
